home *** CD-ROM | disk | FTP | other *** search
/ In Focus Guide to Better Photography / In Focus Guide to Better Photography.iso / flash.dxr / 00001_• movie script.ls next >
Encoding:
Text File  |  1997-07-07  |  3.0 KB  |  112 lines

  1. global folderName, sndPath, gMachine, gPictureCastNumBase, gCurPicture, gTabSprite, gMicFileList, gMicFlashTimes, gFlashCastNum
  2.  
  3. on startMovie
  4.   set gCurPicture to 1
  5.   set gPictureCastNumBase to 60
  6.   set folderName to "flash" & gMachine
  7.   set sndPath to the pathName & "snd" & gMachine & "flash" & gMachine
  8.   initForEachMovie(#flash)
  9.   preloadMember(member 12)
  10.   preloadMember(member (gPictureCastNumBase + 1))
  11.   preloadMember(member "flash sound")
  12.   preLoadRange(37, 50)
  13.   set gMicFileList to list("monks", "redeye", "fillin", "bear", "jazz", "kiosk", "sign", "stuffed", "beer", "bounce2")
  14.   set gMicFlashTimes to list(9.5, 4.5, 4.5, 8, 8, 5.5, 4, 10, 3.5, 7) * 60
  15. end
  16.  
  17. on stopMovie
  18. end
  19.  
  20. on doThumbNailLeftRight leftOrRight
  21.   if leftOrRight = -1 then
  22.     if gCurPicture = 1 then
  23.       set gCurPicture to 10
  24.     else
  25.       set gCurPicture to gCurPicture - 1
  26.     end if
  27.   else
  28.     if gCurPicture = 10 then
  29.       set gCurPicture to 1
  30.     else
  31.       set gCurPicture to gCurPicture + 1
  32.     end if
  33.   end if
  34.   doThumbNailAnimation(29, 18 + (gCurPicture - 1), 2, leftOrRight)
  35.   setupThumbNailCounter(gCurPicture, 10)
  36.   NewPicture()
  37. end
  38.  
  39. on NewPicture
  40.   set the castNum of sprite 7 to gPictureCastNumBase + ((gCurPicture - 1) * 2)
  41.   if (gCurPicture = 5) or (gCurPicture = 10) then
  42.     set flashCast to 37
  43.   else
  44.     set flashCast to 45
  45.   end if
  46.   set the castNum of sprite 10 to flashCast
  47.   setMainPhotoLoc(the castNum of sprite 7)
  48.   updateTabs()
  49.   preloadMember(gPictureCastNumBase + ((gCurPicture - 1) * 2) + 1)
  50.   repeat with ix = 1 to 6
  51.     preloadMember(the castNum of sprite 10 + (ix - 1))
  52.   end repeat
  53. end
  54.  
  55. on finishIntro
  56.   set the mouseDownScript to EMPTY
  57.   set the mouseUpScript to EMPTY
  58.   finishIntroBecauseOfMouseClick()
  59. end
  60.  
  61. on finishIntroBecauseOfMouseClick
  62.   global gSavePhotoCastNum, start, oldStart, gDoOnMouseDown
  63.   puppetSprite(7, 1)
  64.   set the castNum of sprite 7 to gSavePhotoCastNum
  65.   set the castNum of sprite 10 to gFlashCastNum
  66.   setMainPhotoLoc(gSavePhotoCastNum)
  67.   updateTabs()
  68.   updateStage()
  69.   set gDoOnMouseDown to EMPTY
  70.   finishIntroCore()
  71. end
  72.  
  73. on doFlashMouseUp
  74.   set the mouseUpScript to EMPTY
  75.   dontPassEvent()
  76.   doFlashUp(1)
  77. end
  78.  
  79. on flashIsOff
  80.   set curCastNum to the castNum of sprite 10
  81.   return (curCastNum = 37) or (curCastNum = 45)
  82. end
  83.  
  84. on doFlashUp dosound
  85.   set curCastNum to the castNum of sprite 10
  86.   if (curCastNum = (37 + 1)) or (curCastNum = (45 + 1)) then
  87.     if dosound then
  88.       puppetSound("flash sound")
  89.     end if
  90.     repeat with ix = 1 to 3
  91.       set the castNum of sprite 10 to the castNum of sprite 10 + 1
  92.       if ix = 2 then
  93.         set saveCast to the castNum of sprite 7
  94.         set the castNum of sprite 7 to 12
  95.       else
  96.         if ix = 3 then
  97.           set the castNum of sprite 7 to saveCast + 1
  98.         end if
  99.       end if
  100.       updateStage()
  101.       mydelay(3)
  102.     end repeat
  103.     if dosound then
  104.       puppetSound(0)
  105.     end if
  106.   else
  107.     set the castNum of sprite 10 to the castNum of sprite 10 - 5
  108.     set the castNum of sprite 7 to the castNum of sprite 7 - 1
  109.     updateStage()
  110.   end if
  111. end
  112.